-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement internal IsZero
for Wrapping and Saturating for Vec
optimizations
#93455
Conversation
r? @kennytm (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
I think this is a spurious CI failure |
1e7573d
to
652c3fc
Compare
r? @m-ou-se |
r? @thomcc |
This is fully internal and looks good to me. No rollup since this could help perf a fair bit in the off-chance we have uses of this inside rustc (this is pretty unlikely, though). @bors r+ rollup=never |
📌 Commit 652c3fc811d977f620323cb7d8e63136d6b0207a has been approved by It is now in the queue for this repository. |
⌛ Testing commit 652c3fc811d977f620323cb7d8e63136d6b0207a with merge efb31449a452d93ed96b2c293a895b52ee257bfe... |
💔 Test failed - checks-actions |
Oh, hm, this needs more specialization... |
I'd like to rereview after you make whatever changes are needed, so don't just carry the r+ forward if you don't mind. |
Ah, apparently I have to do this to remove it from the queue. @bors r- |
652c3fc
to
71b721f
Compare
This comment has been minimized.
This comment has been minimized.
71b721f
to
9ba169a
Compare
I did not mean to close this, whoops |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
25fe9ed
to
80e035c
Compare
@rustbot ready |
LGTM (and cleaner now), thanks. @bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (289279d): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
This implements the
IsZero
trait for theWrapping
andSaturating
types so that users of these types can get the improved performance from the specialization of creating aVec
from a single element repeated when it has a zero bit pattern (examplevec![0_i32; 500]
, or after this PRvec![Wrapping(0_i32); 500]
)CC #60978